"""
支持关键字可变参数
"""
import time


def decorator(func):
    def wrapper(*args, **kw):
        print(time.time())
        func(*args, **kw)

    return wrapper


@decorator
def f1(param):
    print("This is function1, param: " + param)


@decorator
def f2(param1, param2):
    print("This is function2,param1: " + param1 + " param2: " + param2)


@decorator
def f3(param1, param2, **kw):
    print("This is function3,param1: " + param1 + " param2: " + param2)
    print(kw)


f1('test')
f2('test', 'geg')
a = {'bj': '36c', 'sh': '23c'}
f3('test', 'geg', **a)
f3('test', 'geg', a=1, b=2, c='123')
